﻿<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns='http://www.springframework.net'>
  <!--object id="BaseNHibernateAdapter" abstract="true">
    <property name="hql">
      <value>
        FROM ProjectIssue AS projectIssue
        WHERE 1=1
        /~code: AND projectIssue.code LIKE {code} ~/
        /~name: AND projectIssue.name LIKE {name} ~/
        /~sortColumn: ORDER BY projectIssue.[sortColumn] [sortDirection]~/
      </value>
    </property>
  </object-->
  <object id="BaseNHibernateAdapter" type="FastSpring.ValueList.NHibernate.NHibernateAdapter,FastSpring.Net.ValueList" abstract="true">
    <property name="SessionFactory" ref="SessionFactory"/>
    <property name="IsRemoveEmptyStrings" value="true" />
  </object>
  <object id="CompanyListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Company company Where 1=1
        /~IsActiveS: AND company.IsActive = {IsActiveS} ~/
        /~CpTypeS: AND company.CpType = {CpTypeS} ~/
        /~CompanyCodeS: AND company.CompanyCode LIKE {CompanyCodeS} ~/
        /~CompanyNameS: AND company.CompanyName LIKE {CompanyNameS} ~/
        /~CompanyAliasS: AND company.CompanyAlias LIKE {CompanyAliasS} ~/
        ORDER BY company.CompanyCode
      </value>
    </property>
  </object> 
  <object id="UserListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From User user Where 1=1
        /~CIDS: AND user.CID = {CIDS} ~/
        /~RIDS: AND user.RID = {RIDS} ~/
        /~IsActiveS: AND user.IsActive = {IsActiveS} ~/
        /~IsAuthS: AND user.IsAuth = {IsAuthS} ~/
        /~UserTypeS: AND user.UserType = {UserTypeS} ~/
        /~DepCodeS: AND user.DepCode = {DepCodeS} ~/
        /~UserNameS: AND user.UserName LIKE {UserNameS} ~/
        /~RealNameS: AND user.RealName LIKE {RealNameS} ~/
        /~NickNameS: AND user.NickName LIKE {NickNameS} ~/
        ORDER BY user.UserName
      </value>
    </property>
  </object>
  <object id="ModuleListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Module module Where 1=1
        /~MIDS: AND module.ParentModule is not null AND module.ParentModule.MID = {MIDS} ~/
        /~McodeS: AND module.Mcode = {McodeS} ~/
        /~MnameS: AND module.Mname LIKE {MnameS} ~/
        ORDER BY module.ParentModule,module.Mcode
      </value>
    </property>
  </object>
  <object id="ModuleButtonListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From ModuleButton moduleButton Where 1=1
        /~mid: AND moduleButton.Module.MID = {mid} ~/
        /~McodeS: AND moduleButton.Module.Mcode = {McodeS} ~/
        /~ButtonCodeS: AND moduleButton.ButtonCode = {ButtonCodeS} ~/
        /~ButtonNameS: AND moduleButton.ButtonName LIKE {ButtonNameS} ~/
        ORDER BY moduleButton.Module.MID,moduleButton.ButtonCode
      </value>
    </property>
  </object>
  <object id="FunctionListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Function function Where 1=1
        /~FIDS: AND function.ParentFunction is not null AND function.ParentFunction.FID = {FIDS} ~/
        /~FunCodeS: AND function.FunCode = {FunCodeS} ~/
        /~FunNameS: AND function.FunName LIKE {FunNameS} ~/
        ORDER BY function.ParentFunction,function.OrdNum
      </value>
    </property>
  </object>
  <object id="MenuListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Menu menu Where menu.MenuID>1
        /~MenuIDS: AND menu.ParentMenu is not null AND menu.ParentMenu.MenuID = {MenuIDS} ~/
        /~MnameS: AND menu.Mname LIKE {MnameS} ~/
        /~MurlS: AND menu.Murl LIKE {MurlS} ~/
        ORDER BY menu.ParentMenu.MenuID,menu.Morder
      </value>
    </property>
  </object>
  <object id="RoleListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Role role Where 1=1
        /~RcodeS: AND role.Rcode LIKE {RcodeS} ~/
        /~RnameS: AND role.Rname LIKE {RnameS} ~/
        ORDER BY role.Rcode
      </value>
    </property>
  </object>
  <object id="LogListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Log log Where 1=1
        /~UserNameS: AND log.UserName = {UserNameS} ~/
        /~UrlS: AND log.Url LIKE {UrlS} ~/
        /~LogTitleS: AND log.LogTitle LIKE {LogTitleS} ~/
        /~LogMessageS: AND log.LogMessage LIKE {LogMessageS} ~/
        /~LogIpS: AND log.LogIp LIKE {LogIpS} ~/
        /~ModuleCodeS: AND log.ModuleCode = {ModuleCodeS} ~/
        ORDER BY log.LogCreateDate DESC
      </value>
    </property>
  </object>
  <object id="GeneratorIdListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From GeneratorId generatorId Where 1=1
        /~TableNameS: AND generatorId.TableName LIKE {TableNameS} ~/
        ORDER BY generatorId.TableName
      </value>
    </property>
  </object>
  <object id="ConfigListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Config config Where 1=1
        /~ConfigNameS: AND config.ConfigName LIKE {ConfigNameS} ~/
        /~ConfigValueS: AND config.ConfigValue LIKE {ConfigValueS} ~/
        ORDER BY config.ConfigName
      </value>
    </property>
  </object>  
  <object id="EnumListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Enum enum Where 1=1
        /~MTypeS: AND enum.MType = {MTypeS} ~/
        /~MCodeS: AND enum.MCode LIKE {MCodeS} ~/
        /~MNameS: AND enum.MName LIKE {MNameS} ~/
        ORDER BY enum.MType,enum.MOrder
      </value>
    </property>
  </object>
  <object id="PagerListAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From PagerList pagerList Where 1=1
        /~PagerSignS: AND pagerList.PagerSign like {PagerSignS} ~/
        /~PageNameS: AND pagerList.PageName like {PageNameS} ~/
        ORDER BY pagerList.ID DESC
      </value>
    </property>
  </object>
  <object id="PagerListFieldAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From PagerListField pagerListField Where 1=1
        /~PagerIDS: AND pagerListField.PagerID = {PagerIDS} ~/
        /~ParentKey: AND pagerListField.PagerID = {ParentKey} ~/
        /~TableIDS: AND pagerListField.TableID = {TableIDS} ~/
        /~FieldNameS: AND pagerListField.FieldName like {FieldNameS} ~/
        /~FieldClassNameS: AND pagerListField.FieldClassName like {FieldClassNameS} ~/
        /~FieldControlIDS: AND pagerListField.FieldControlID like {FieldControlIDS} ~/
        ORDER BY pagerListField.PagerID,pagerListField.TableID,pagerListField.OrdNum
      </value>
    </property>
  </object>
  <object id="PagerListButtonAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From PagerListButton pagerListButton Where 1=1
        /~PagerIDS: AND pagerListButton.PagerID = {PagerIDS} ~/
        /~ParentKey: AND pagerListButton.PagerID = {ParentKey} ~/
        /~ButtonNameS: AND pagerListButton.ButtonName = {ButtonNameS} ~/
        ORDER BY pagerListButton.PagerID,pagerListButton.OrdNum
      </value>
    </property>
  </object>
</objects>

